/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import javax.enterprise.context.SessionScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.event.ActionEvent;
import javax.inject.Named;
import org.primefaces.context.RequestContext;

/**
 *
 * @author Thais
 */

@SessionScoped
@ManagedBean(name = "exercicioBean")
public class ExercicioBean implements Serializable{
    private boolean showDialog;

    public void abrePopupExercicio(ActionEvent actionEvent) {
        
        System.out.print("teste");
//        Map<String, Object> options = new HashMap<String, Object>();
//        options.put("modal", true);
//        options.put("draggable", false);
//        options.put("resizable", false);
//        options.put("contentHeight", 620);
        //hint: available options are modal, draggable, resizable, width, height, contentWidth and contentHeight  

//        RequestContext.getCurrentInstance().openDialog("popupExercicio", options, null);
//        RequestContext context = RequestContext.getCurrentInstance();
//       context.openDialog("/faces/Telas/popupExercicio.xhtml");
    }
    public void showDialog() {
    showDialog = true;
}

public boolean isShowDialog() {
    return showDialog;
}
}
